﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="B2B.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HEAD" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="main_content" runat="server">

    <script type="text/javascript">        
        function Xoa(maspmua)
        {
            var trang = <%= ViewData["page"]%>
            var json = {
                id:1,
                page:trang,
                XoaMaSanPhamMua: maspmua
            };
            $.ajax({
                url: '/Product/ProductWatchPostBuyRequest',
                type: 'POST',
                contentType: 'application/json',
                dataType: 'json',
                data: JSON.stringify(json),
                success: function (response) {
                    alert(response);
                }
            });
        }

    </script>

    <table border="0">
        <% for (int i = 0; i < ((ArrayList)ViewData["ds_SanPhamMua"]).Count; i++)
           {
               PostBuyRequest ds = ((PostBuyRequest)((ArrayList)ViewData["ds_SanPhamMua"])[i]);%>
        <tr>
            <td rowspan="6"><img style="width:250px; height:200px" src="../../Images/Product/<%=((PostBuyRequest)ds).HinhAnh%>" /></td>
            <th>Name product:</th>                  <td><%=((PostBuyRequest)ds).TenSanPham%>            </td>
            
        </tr>
        <tr><th>Buyer:</th>                         <td><%=((PostBuyRequest)ds).Hoten %></td></tr>
        <tr><th>Email:</th>                         <td><%=((PostBuyRequest)ds).Email %></td></tr>
        <tr><th>Catalog:</th>                       <td><%=((PostBuyRequest)ds).TenDanhMuc%>            </td>                                                                                                                           </tr>
        <tr><th>Estimated Order Quantity:</th>      <td><%=((PostBuyRequest)ds).SoLuongCanMua%>         </td>                                                                                                                           </tr>
        <tr><th>Detail:</th>                        <td><%=((PostBuyRequest)ds).ChiTiet%>               </td>      
        <tr><td></td> <th>Date:</th>                         <td><%=((PostBuyRequest)ds).NgayDang%></td>                               </tr>
        <tr>
            <td></td>
            <td>
                <form action="/Manage/QuoteCreate" method="post">
                    <input type="submit" value="Quote Now" />
                    <input type ="hidden" name="loai" value="0" />
                    <input type="hidden" name="maSPM" value="<%=((PostBuyRequest)ds).MaSanPhamMua %>" />
                    <input type="hidden" name="emailNguoiNhan" value="<%=((PostBuyRequest)ds).Email %>" />
                 </form>
            </td>
        </tr>
        
      
        <% } %>
     
    </table>
</asp:Content>
